<?php
$c=(isset($_GET['c']))?$_GET['c']:'Match';
define("CONTROLLER",$c);
$a=(isset($_GET['a']))?$_GET['a']:'index';
define("ACTION",$a);
$m=(isset($_GET['m']))?$_GET['m']:'home';
define("MODULE",$m);//模块名
spl_autoload_register('myload');
$classlist=array(
    'MysqlDb'=>'./freamwork/MysqlDb.class.php',
    'Factory'=>'./freamwork/Factory.class.php',
    'Smarty'=>'./freamwork/lib/smarty/Smarty.class.php',
    'SController'=>'./freamwork/SController.php'
);
function myload($class){
    global $classlist;
    global $m;
    if(isset($classlist[$class])){
        require_once($classlist[$class]);
    }
    elseif('Model'==substr($class,-5)){
        require_once("./app/$m/Model/$class.php");
    }
    elseif('Controller'==substr($class,-10)){
        require_once("./app/$m/Controller/$class.php");
    }
}
$Controller=$c.'Controller';
$Controller=Factory::getClass($Controller)->$a();

?>